#include "widget5.h"
#include "ui_widget5.h"

Widget5::Widget5(FlightBookingSystem& system,QWidget *parent)
    :bookingSystem(system),
    QWidget(parent),
    ui(new Ui::Widget5)
{
    ui->setupUi(this);
}

Widget5::~Widget5()
{
    delete ui;
}

void Widget5::on_pushButton_clicked()
{
    emit this->back();
}

void Widget5::showEvent(QShowEvent *event)
{
    bookingSystem.displayFlights(ui->textBrowser);
}
